package com.zxx.pattern.buildPattern.build2;

/**
 * 具体建造者
 *
 * @author zxx on 2020/12/11
 */
public class Builder2Computer extends Builder2 {

    private Product2 mComputer = new Product2();

    @Override
    public void buildCpu(String cpu) {
        mComputer.setmCpu(cpu);
    }

    @Override
    public void buildMainBoard(String mainBoard) {
        mComputer.setmBoard(mainBoard);
    }

    @Override
    public void buildRam(String ram) {
        mComputer.setmRam(ram);
    }

    @Override
    public Product2 create() {
        return mComputer;
    }
}
